program Convexity;

{$APPTYPE CONSOLE}
var
x, y : array of real;
n, i : integer;
fin : textfile;
s1, s : real;
begin
  assignfile(fin, 'input.txt');
  reset(fin);
  readln(fin, n);
  setlength(x, n);
  setlength(y, n);
  for i:=1 to n do
  begin
    if i mod 2 <> 0 then
    begin
      read(fin, x[i]);
    end
    else
    begin
      read(fin, y[i-1]);
    end;
  end;
  for i:=1 to n-2 do
  begin
    s1 := s;
    s := (x[1]-x[i+2])*(y[i+1]-y[i+2])-(x[i+1]-x[i+2])*(y[1]-y[i+2]);
    if (abs(s) = abs(s1)) and (s <> s1) then
    begin
      writeln('no');
      exit;
    end;
  end;
  writeln('yes');
end.
